<template>
  <div class="submit-btn cenCen" @click="subOrder()">
    <div>提交</div>
  </div>
</template>
<script>
import { storageCar } from "./../../../publicJs/storageCar.js";
export default {
  methods: {
    subOrder() {
      if (this.$store.state.buyTicket.carTicketSumList.length == 0) {
        this.$toast("请先购票");
        return;
      }
      //本地存储一些购物车的数据防止刷新导致数据丢失
      storageCar();
      this.$router.push({
        name: "orderEnter"
      });
    }
  }
};
</script>
